.PHONY:all
all:server client

start_http:
	scl enable devtoolset-7 bash

server:server.cpp add_contacts.pb.cc
	g++ -std=c++11 $^ -o $@ -lpthread -lprotobuf

client:client.cpp add_contacts.pb.cc
	g++ -std=c++11 $^ -o $@ -lpthread -lprotobuf

protobuf:add_contacts.proto
	protoc --cpp_out=. $^

read:
	protoc --decode=add_contacts.AddContactsRequest add_contacts.proto < contacts.bin

print:
	protoc --decode=contacts.contacts add_contacts.proto < contacts.bin

.PHONY:clean
clean:
	rm -rf server client add_contacts.pb.cc add_contacts.pb.h